Skip to main content

Delete Source after Transcoding

Table of Contents

  1. Method 1: Cleanup Tab (Preferred Method)
  2. Method 2: Post Task Command Line
  3. Method 3: Simple Action

Method 1: Cleanup Tab (Preferred Method)

This is the preferred method for deletion because it is the most used and allows users to retrieve their source file within a certain time frame before deletion. This function ensures that all files used within the watch folder will be deleted after a specified time. Users can set it to delete either all files used or only those successfully processed.

Steps to use the Cleanup function in Watch Folder:

  1. From the Watch Folder Configuration, go to the "Cleanup" tab.
  2. Adjust how often the Watch Folder will cycle through cleaning by changing the "Clean up watch folder every:" to the desired time.
  3. Click the "Add…" button twice to open the Trigger section. (From here you can configure what triggers the deletion of files within the Watch Folder.)

Cleanup Tab Screenshot

  1. In the "Add Triggered Action" window, navigate to the Action dropdown menu and select Delete Source.

Triggered Action Screenshot

Now, files in the Watch Folder will be cleaned within the Cleanup cycle if all requirements are met.

Limitations:

  • You need to adjust the cycle frequency and trigger timing.
  • Unlike other methods, sources are not deleted immediately after a transcoding job. Think of it as a timer where marked items are discarded when the timer reaches 0, provided all conditions are met.

Method 2: Post Task Command Line

Using the Post Task Command Line, users can enter a command to delete the source file immediately after successful transcoding.

Steps to use the Post Task command line in Watch Folder:

  1. From the Watch Folder Configuration, go to the Encoding tab and add/edit an encoding preset.
    Watchfolder Post Task
  2. Select the "Post Task" tab and look for "Command Line".
  3. Enter the following command:
    cmd /C del "%sourceFile0%"

Delete Source

Now, the source file will be successfully deleted when the job finishes.

Limitations: The quotes around "%sourceFile0%" are required to handle filenames with spaces. This method is less convenient since it requires entering a command into a text field. Entering the wrong command will result in the source not being deleted.

Method 3: Simple Action

Using the Simple Action feature allows users to delete a source in a queue format. This method is useful if additional tasks, such as uploading the source to S3, need to be performed before deletion.

Steps to Use Simple Action in Watch Folder:

  1. From the Watch Folder Configuration, go to the Encoding tab and click "Add Simple Action…".
  2. In the Action dropdown menu, select "Delete source".

Simple Action

  1. In the Encoding tab, uncheck the "Perform actions in parallel" checkbox at the bottom left.

Parallel Actions

Now, the source file will be successfully deleted when the job finishes.

Limitations

  • Ensure that "Perform actions in parallel" is unchecked; otherwise, the source being transcoded will be deleted during the job.
  • Make sure the Encoding job is queued before the Delete source action to ensure the transcoding job happens first.